/**
 * Created by changshuiwang on 2016/7/14.
 */
$(function(){
    $("#regist-form button").click(function(){
        var data=$("#regist-form").serialize();
        var url=$("#regist-form").attr('action');
        $.ajax({
            type:"POST",
            url:url,
            data:data,
            dataType:"json",
            success:function(msg){
                if(msg.status=="success"){
                    window.location.href='/site/login';
                }else{
                    alert(msg.msg);
                }
            }
        });
        return false;
    })
});